import 'package:color_dart/RgbaColor.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:im_flutter_sdk_example/components/a_button/index.dart';
import 'package:im_flutter_sdk_example/utils/global.dart';

class ServeSuccess extends StatelessWidget {
  const ServeSuccess({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
        appBar: AppBar(title: Text('购买成功')),
        body: SafeArea(
          child: Container(
            decoration: BoxDecoration(
              color: rgba(255, 255, 255, 1),
              border: Border(
                top: BorderSide(
                  width: 1, //宽度
                  color: rgba(221, 221, 221, 0.5), //边框颜色
                ),
              ),
            ),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceAround,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                Column(children: [
                  Padding(
                    padding: EdgeInsets.only(right: 30),
                    child: SizedBox(
                      width: 180,
                      height: 180,
                      child: Image.asset(
                        'lib/assets/images/activity/active_success.png',
                        fit: BoxFit.cover,
                      ),
                    ),
                  ),
                  Padding(
                    padding: EdgeInsets.fromLTRB(0, 10, 0, 4),
                    child: Text(
                      '服务购买成功 ！',
                      style: TextStyle(
                        color: rgba(51, 51, 51, 1),
                        fontSize: 21,
                      ),
                    ),
                  ),
                  Text(
                    '请到我的订单里查看详细信息',
                    style: TextStyle(
                      color: rgba(163, 163, 163, 1),
                      fontSize: 15,
                    ),
                  ),
                ]),
                Container(
                  decoration: BoxDecoration(
                    boxShadow: [
                      //阴影效果
                      BoxShadow(
                        offset: Offset(0, 4), //阴影在X轴和Y轴上的偏移
                        color: rgba(42, 125, 250, 0.45), //阴影颜色
                        blurRadius: 25, //阴影程度
                        spreadRadius: 0, //阴影扩散的程度 取值可以正数,也可以是负数
                      ),
                    ],
                  ),
                  child: AButton.normal(
                      child: Text('我的订单'),
                      type: 'primary',
                      onPressed: () {},
                      width: 161,
                      height: 45,
                      borderRadius: BorderRadius.circular(40),
                      bgColor: rgba(42, 125, 250, 1)),
                )
              ],
            ),
            height: G.screenHeight(),
            width: G.screenWidth(),
          ),
        ),
      ),
    );
  }
}
